<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" dir="ltr">

<head>
<link rel="stylesheet" type="text/css" href="css/css.css" />
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
<title>订单详情</title>
<style>
.div {
	height: 470px;
}

.com {
	height: 80px;
}

#table {
	width: 100%;
	font-size: 20px;
	text-align: center;
	vertical-align: middle;
}

#pic {
	height: 200px;
	width: 200px;
}
</style>
</head>

<body onResize="Resize()" onLoad="Resize()">
	<div class="menu">
		<ul>
			<li style="width: 0px;"><a></a></li>
			<li class="active"><a href="loginSuc.jsp" class="home">首页</a></li>
			<li><a href="info.jsp" class="account">个人信息</a></li>
			<li><a href="orderform.jsp" class="wishlist">订单查询</a></li>
			<li style="float: right;">欢迎<b id="sellerName" value="${seller.sellerName}">${seller.sellerName}</b>来到您的个人商铺！
			</li>
			<li style="float: right;"><a href="index.html" class="login">退出登录</a></li>
		</ul>
	</div>
	<!--里面内容总高度为550px；-->
	<center>
		<div class="com">
			<img alt="Site Name" src="images/modifyorder.jpg">
		</div>
	</center>
	<div class="cart-info">
		<div class="div">




			<table id="table"></table>
	<h3>备注：</h3><h4>订单状态：</h4>0：取消的订单；<br>1：正常完成的订单；<br>2：未付款的订单；<br>3：付款完成准备发货

		</div>
	</div>




	<div class="icart-footer">
		<div class="icart-footer-top">
			<div style="width: 1000px; margin: 0 auto;"></div>
		</div>
		<div class="icart-footer-container">
			<div class="column_footer" style="width: 500px;">
				<h3>关于我们</h3>
				<div class="footer_description">......</div>
			</div>

			<div class="column_footer" style="width: 150px;">
				<h3>客户服务</h3>
				<ul>
					<li><a href="#">隐私声明</a></li>
					<li><a href="#">联系我们</a></li>
					<li><a href="#">地图</a></li>
				</ul>
			</div>

			<div class="column_footer" style="width: 150px;">
				<h3>其他</h3>
				<ul>
					<li><a href="#">主要品牌</a></li>
					<li><a href="#">关联企业</a></li>
				</ul>
			</div>


			<div class="column_footer" style="margin-right: 0px;">
				<h3>社会服务</h3>
				<ul class="social">
					<li class="twitter"><a href="#">Twitter Username</a></li>
					<li class="facebook"><a href="#">Facebook</a></li>
					<li class="rss"><a href="#">RSS Feed</a></li>
				</ul>
			</div>
			<div class="clearfix"></div>
		</div>
		<div class="icart-footer-bottom">
			<div style="width: 1000px; margin: 0 auto;">
				
				<ul>
					<li style="float: right; padding-top: 10px; list-style: none;"><a
						href="#">&copy; Copyright &copy; 南京大学 大数据与移动云计算
							第二小组&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
				</ul>
				<div class="clearfix"></div>
			</div>

		</div>
	</div>
	<div style="display: none">
		<script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540'
			language='JavaScript' charset='utf-8'></script>
	</div>
</body>
<script>
	var I = null;

	var thisURL = document.URL;
	var showval = thisURL.split("=")[1];
	//进入个人店铺页面显示所有个人商品
	$(document)
			.ready(
					function() {

						$
								.ajax(
										"orderform",
										{
											type : "POST",
											dataType : 'text',
											success : function(data) {

												//alert(data);
												var jsonObj = eval("(" + data
														+ ")");

												$("#table")
														.html(
																"<tr><th width='10%'>订单序号</th><th width='10%'>当前状态</th><th width='10%'>更改状态</th></tr>")
												$
														.each(
																jsonObj,
																function(i,
																		item) {
																	if (item.orderId == showval) {
																		I = item;
																		$(
																				"#table")
																				.append(
																						"<tr><td>"
																								+ item.orderId
																								+ "</td><td>"
																								+ "<input id='orderStatus' type='text' value='"
																								+ item.orderStatus
																								+ "'</td>"
																								+ "<td><button onclick='f()'>确定修改</button></td>"
																								+ "</tr>"

																				)

																	}

																});
											}
										});
					});

	function f() {

		var id = I.orderId;
		var orderStatus = document.getElementById("orderStatus").value;
		var orderform = {
			"orderId" : id,
			"orderStatus" : orderStatus,
		
		}
		$.ajax("modifyorderform", {
			data : orderform,
			type : "POST",
			success : function() {
				//alert("ok");
				alert("修改完成");
				window.location.href = "orderform.jsp?data=" + I.orderId
						+ "";
			}

		});
	}
</script>

<script language="JavaScript" type="text/javascript">
	$(function() {
		var winWidth, winHeight;
		Resize = function() {
			winWidth = $(window).width(), winHeight = $(window).height();
		}
	});
</script>
</html>
